﻿<!-- OrderSideBar-->
<div data-ng-controller="orderSidebar as vm" data-ng-show="vm.cartOrder">
    <div class="well sidebar-nav">
        Menu
        <ul class="nav nav-list">
            <li data-ng-repeat="state in vm.menuStates" data-ng-class="{active: vm.isSelected(state)}" >
                <a href="#" data-ui-sref="{{state.sref}}">{{state.name}}</a>
            </li>
        </ul>
    </div>

    <div class="well" style="background-color: rgb(199, 235, 199); padding-bottom: 40px;">
        Order Summary
        <table class="table table-condensed" style="font-size:small">
            <tr><th>Item</th><th>Size</th><th>Qty</th></tr>
            <tr data-ng-repeat="item in vm.cartOrder.orderItems">
                <td><a href="#" data-ui-sref="{{vm.cartItemStateRef(item)}}">{{item.product.name}}</a></td>
                <td>{{item.productSize.name}}</td>
                <td>{{item.quantity}}</td>
            </tr>
        </table>
        <p></p>
        <div class="btn-group pull-right">
            <a class="btn btn-warning" href="#" data-ui-sref="app.order.cart"><i class="icon-shopping-cart icon-white"></i> Cart</a>
        </div>

    </div>

    <div class="well" >
        Recently Viewed
        <table class="table table-condensed" style="font-size:small">
            <tr><th>Item</th><th>Size</th><th>Qty</th></tr>
            <tr data-ng-repeat="item in vm.draftOrder.orderItems">
                <td><a href="#" data-ui-sref="{{vm.draftItemStateRef(item)}}">{{item.product.name}}</a></td>
                <td>{{item.productSize.name}}</td>
                <td>{{item.quantity}}</td>
            </tr>
        </table>
    </div>
</div>
